Skip to content

Conversation

@rodrigo-o
Copy link
Collaborator

@rodrigo-o rodrigo-o commented Oct 10, 2025

Motivation

This PR reduce memory by 40~50%

Description

This PR sits on top of #4821 and after different testing scenarios we came up with this cut in memory:

The caveat is that it appears to be 50% slower, we need to double check it.

@github-actions
Copy link

Lines of code report

Total lines added: 48
Total lines removed: 12
Total lines changed: 60

Detailed view
+----------------------------------------------+-------+------+
| File                                         | Lines | Diff |
+----------------------------------------------+-------+------+
| ethrex/crates/networking/p2p/peer_handler.rs | 1845  | +48  |
+----------------------------------------------+-------+------+
| ethrex/crates/storage/store_db/rocksdb.rs    | 1101  | -12  |
+----------------------------------------------+-------+------+

@rodrigo-o
Copy link
Collaborator Author

rodrigo-o commented Oct 10, 2025

Here is a table comparision of 2 runs of this PR vs main:

Node Memory (RSS) & Host in images

Main This PR #1 This PR #2
Snap time: 03:30 Snap time: 05:20 Snap time: 05:30
Mean: ~15.5GB & Max: ~22GB Mean: ~8GB & Max: ~13GB Mean: ~9.5GB & Max: ~15GB
image image image

This is an enhancement of ~40~50% in the Mean and ~30~40% in peaks, it appears to be a noticeable regression related to time ~50% slower, but we need more test to validate it wasn't an issue of the particular runs (variance for the runs is still high)

@rodrigo-o rodrigo-o changed the title Memory enhancement rocksdb chore(l1): memory enhancement no transactional rocksdb + no cache Oct 10, 2025
@rodrigo-o rodrigo-o changed the title chore(l1): memory enhancement no transactional rocksdb + no cache chore(l1): memory enhancement - no transactional rocksdb + no cache Oct 10, 2025
@github-actions github-actions bot added the L1 Ethereum client label Oct 10, 2025
@rodrigo-o
Copy link
Collaborator Author

Closed in favor of #4853

@rodrigo-o rodrigo-o closed this Oct 13, 2025
github-merge-queue bot pushed a commit that referenced this pull request Oct 17, 2025
…plicit configured cache (#4853)

**Motivation**

This PR reduce memory by 40~50%

**Description**

This PR sits is basically #4839 but instead of starting from #4821 it
starts from main, and after different testing scenarios we came up with
this cut in memory:
- reverts #4599
- removes the rocksdb cache explicit setup

The caveat is that it appears to be 50% slower, we need to make specific
measures to validate the results seen in #4839

---------

Co-authored-by: Mario Rugiero <[email protected]>
Co-authored-by: Javier Chatruc <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

L1 Ethereum client

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

1 participant